<?php


namespace App\Http\Controllers\admin\model;


use Illuminate\Support\Facades\DB;

class StatisticsAppModel
{
    public static function queryWhereSum($where,$param,$field){
        if($param){
            return DB::table('t_statistics_app')
                ->where($where)
                ->where('create_time','>=',$param['begTime'])
                ->where('create_time','<=',$param['endTime'])
                ->sum("$field");
        }
        return DB::table('t_statistics_app')
            ->where($where)
            ->sum("$field");
    }
}